function bc_currency(currency_type,parse){
    var arr = [];
    arr = {
        'currency_1' : {
            'name' : "现金",
            'unit' : "元",
            'exchange' : ""
        },
        'currency_2' : {
            'name' : "喜糖",
            'unit' : "颗",
            'exchange' : "1"
        },
        'currency_3' : {
            'name' : "",
            'unit' : "",
            'exchange' : ""
        }
    };
    var returnstr = arr;
    if(currency_type){
        returnstr = arr[currency_type];
        if(parse){
            returnstr = returnstr[parse];
        }
    }
    return returnstr;
}

$(document).ready(function($) {
    var _page = $('.page');
    var user_obj = JSON.parse($(_page).find('input[name=user_obj]').val());
    var target_obj = JSON.parse($(_page).find('input[name=target_obj]').val());
    if (!target_obj.user_id || !target_obj.user_id) {
        return bottlecms.toast("信息错误");
    }
    $(_page).on('click', '.js-handle', function() {
        bottlecms.actions([
            [{
                text: '查看资料',
                onClick: function(modal, e) {
                    bottlecms.goto('/m/single/info/' + target_obj.user_id);
                }
            }, {
                text: '删除聊天记录',
                onClick: function(modal, e) {
                    delete_chat_fun(target_obj.user_id);
                }
            }],
            [{
                text: '取消',
                bg: 'danger'
            }]
        ]);
    });

    var dialogue = null;
    dialogue = bottlecms.dialogue.init({
        elem: $(_page).find(".bcui-dialogue"),
        me: user_obj,
        he: target_obj
    });

});